@extends('layout.admin.index')
@section('content')
<div class="panel admin-panel margin-top">
	<div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>添加内容</strong></div>
	<div class="body-content">
	    <form method="post" class="form-x" action="/admin/goods/update">
			<!-- 隐藏域发送csrf保护 -->
			{{ csrf_field() }}
			<!-- csrf保护结束 -->
			<input type="hidden" name="id" value="{{ $deldata['id'] }}">
	      	<div class="form-group">
		      	<div class="label">
		          	<label>上级分类: </label>
		        </div>
		        <div class="field">
		          	<select name="goods_sort" class="input w50">
		            	<!-- 遍历分类列表数据库中的分类 -->
						@foreach($data as $key =>$value)
		            	<option value="{{ $value['id'] }}" @if($value['id'] == $deldata['goods_sort']) selected @endif>{{ $value['goods_name'] }}</option>
						@endforeach
						<!-- 分类列表遍历结束 -->
		          	</select>
		        	
		        </div>
	      	</div>
	      	<div class="form-group">
		        <div class="label">
		          	<label>分类标题：</label>
		        </div>
		        <div class="field">
		          	<input type="text" class="input w50" name="goods_name" value="{{ $deldata['goods_name'] }}" />
		          	<div class="tips"></div>
		        </div>
	      	</div>
		    <div class="form-group">
			    <div class="label">
			     	<label></label>
			    </div>
			    <div class="field">
			      	<button class="button bg-main icon-check-square-o" type="submit"> 添加</button>
			    </div>
		    </div>
	    </form>
	  </div>
</div>
@endsection